package com.example.helloworld.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {

    @RequestMapping("/hello")
    public String hello(@RequestParam(required = true, name = "name") String name){
        if (StringUtils.isBlank(name)){
            name = "testhere";
        }
        return String.format("hello , %s !", name);
    }
}
